Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

fix-next(nsCliHelpers): return undefined if no global CLI #476

Merged
merged 1 commit into from
Mar 27, 2018

Conversation

sis0k0
Copy link
Contributor

@sis0k0 sis0k0 commented Mar 26, 2018

The plugin should fall back to using some default project settings (appPath: 'app', appResourcesPath: 'app/App_Resources') if {N} CLI is not globally installed.

Steps to test:

  1. Create new {N} project:
tns create my-project
cd my-project
  1. Uninstall {N} CLI:
npm uninstall -g nativescript

If you're using nvm it wouble be enough to set up an empty workspace by installing a new node version. For example - nvm install 9.9.0.

  1. Install nativescript-dev-webpack from the current PR's branch:
npm i nativescript/nativescript-dev-webpack#sis0k0/return-if-no-tns

Expected behaviour
The plugin should be installed successfully and vendor.ts, vendor-platform.android.ts and vendor-platform.ios.ts should be added inside the app/ dir.

Current behaviour
The postinstall script fails while trying to find globally installed tns.

@sis0k0 sis0k0 added the bug label Mar 26, 2018
@sis0k0 sis0k0 self-assigned this Mar 26, 2018
@sis0k0 sis0k0 requested a review from etabakov March 26, 2018 18:27
Copy link
Contributor

@etabakov etabakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@sis0k0 sis0k0 merged commit 496fa55 into master Mar 27, 2018
@sis0k0 sis0k0 deleted the sis0k0/return-if-no-tns branch March 27, 2018 09:18
@etabakov
Copy link
Contributor

Everything works great now. Thanks for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants